import jwt
from django.conf import settings

class VerifyToken:

    @classmethod
    def token_generator(self, playload_data):
        return jwt.encode(
            playload_data,
            settings.SCRETE_PHASE,
            algorithm='HS256',  
        )

    @classmethod
    def token_decode(self, token):
        data = jwt.decode(
            token,
            settings.SCRETE_PHASE,
            algorithms=['HS256',],
        )
        return data